Across the membranes of which structures does carbon dioxide diffuse when it is excreted from bloodstream to atmosphere?